home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / STANDALO / SHOWINIT / INIT.H < prev    next >
Text File  |  1990-07-29  |  1KB  |  45 lines

  1. /*
  2.     init.h : Header file for INITs
  3. */
  4. /* #define APPLICATION */    /* #define if compiling for standalong application */
  5. /* #define INIT_ALL */    /* #define to init all toolbox managers (erase screen) */
  6. #define PERMANENT        /* #define to detach ourselves (be sure in sys heap) */
  7.  
  8.     /* CODE_SETUP pushes most registers to the stack and places a copy of
  9.         a0 into a4, which will contain a pointer to our own code resource.
  10.     */
  11. #define CODE_SETUP()    asm {                                \
  12.                     movem.l    a0-a5/D0-D7, -(SP)        \
  13.                     move.l        a0, a4                    \
  14.                     }
  15.  
  16.     /* CODE_CLEANUP restores most registers from the stack. */
  17. #define CODE_CLEANUP()    asm {                                \
  18.                     movem.l    (SP)+, a0-a5/D0-D7        \
  19.                     }
  20.  
  21.     /* Quickdraw global variables */
  22. #ifndef APPLICATION
  23. #define GrafSize        206        /* from IM I-209. Total QDraw storage. */
  24. #define ADD_GRAFSIZE    (GrafSize - 130)    /* 130 bytes in shown fields */
  25. typedef struct
  26. {
  27.     char            filler[ADD_GRAFSIZE];    /* internal QD storage */
  28.     long            randSeed;
  29.     BitMap            screenBits;
  30.     Cursor            arrow;
  31.     Pattern        dkGray;
  32.     Pattern        ltGray;
  33.     Pattern        gray;
  34.     Pattern        black;
  35.     Pattern        white;
  36.     GrafPtr        thePort;
  37. } QD_GLOBALS;
  38. #endif
  39.  
  40. #ifndef NULL                /* LSC puts this in stdio of all places... */
  41. #define NULL ( (void *)0 )
  42. #endif
  43.  
  44.  
  45.